import request from "../utils/request";

// 登录
export const getLoginApi = (body) => {
    return request('/login', {
        method: 'post',
        body,
    })
}

// 根据用户名获取菜单
export const getMenusApi = () => {
    const username = JSON.parse(localStorage.getItem('user')).username
    console.log('999', username);
    return request(`/menu/${username}`, {})

}


// 获取用户管理数据
export const getUserApi = (body) => {
    return request(`/user`, {
        method:'get',
        query:body
    })

}